package cn.bitoone;

import dummy.DummyOuterClass;

/**
 * ProtoBoot
 *
 * @author diyiliu
 * @create 2025-09-28 10:48
 **/
public class ProtoBoot {

    public static void main(String[] args) throws Exception {

        DummyOuterClass.Dummy dummy = DummyOuterClass.Dummy.newBuilder()
                .setAge(10).build();

        System.out.println(dummy.getAge());

        byte[] bytes = dummy.toByteArray();

        DummyOuterClass.Dummy dummy2 = DummyOuterClass.Dummy.parseFrom(bytes);
        System.out.println(dummy2.getAge());
    }
}
